extends Component
var _player:CharacterBody2D
func _enter_tree() -> void:
	assert(Global.has_player==false)
	Global.has_player=true
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	_player=host
	Global.player_fable.connect(func(v:bool):$"../../Display/Interaction".visible=v)
func _physics_process(delta: float) -> void:
	Global.player_position = _player.global_position
	Global.player_velocity = _player.velocity
	Global.player_screen_pos = _player.get_global_transform_with_canvas().get_origin()
func _exit_tree() -> void:
	Global.has_player=false
func _enable():
	set_physics_process(true)
func _disable():
	set_physics_process(false)
